import { combineResolvers } from 'graphql-resolvers'
import auth from '../../middlewares/auth'

module.exports = {
  Query: {
    getMemberSubmitedsByTaskId: combineResolvers(
      auth,
      async (
        root,
        { taskId },
        { services: { $member }, user }
      ) => {
        let members = await $member.getSubmitedsByTaskId({autherId: user.id, taskId})
        return members
      }
    ),
  },
}
